package com.nb.hdj.testCase.configurationModule;

import com.nb.hdj.data.HtConfigurationEnum;
import org.openqa.selenium.WebDriver;

/**
 * @Description: 直播分类子菜单
 * @Author: hedongjia
 * @Date: 2021/12/24 下午3:25
 * @Version: v1.0
 */
public class LiveClassCase extends ConfigurationCaseBase{
    /**
     * 查看直播分类
     * @param driver
     * @return
     */
    public boolean viewLiveClass(WebDriver driver) {
        try {
            seleniumUtil.sleep(1500);
            //调用配置管理模块  查看方法
            return viewBase(driver, HtConfigurationEnum.Live_Class_Element.getValue(),
                    HtConfigurationEnum.CONFIGURATION_Content_First_Name_Element.getValue());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }

    /**
     * 新增直播分类
     * @param driver
     * @return
     */
    public boolean insertLiveClass(WebDriver driver){
        cm.setClassName("测试直播分类").setSortNumber("1");
        return insertBase(driver,cm);
    }

    /**
     * 更改直播分类
     * @param driver
     * @return
     */
    public boolean updateLiveClass(WebDriver driver){
        cm.setClassName("更改直播分类").setSortNumber("1");
        return updateBase(driver,cm);
    }

    /**
     * 删除图库分类
     * @param driver
     * @return
     */
    public boolean deleteLiveClass(WebDriver driver){
        return deleteBase(driver,cm);
    }
}
